package physics;

import java.awt.event.ActionEvent;

import physics.Collisions.Collision;
import physics.MovementControl.JumperMovementController;

import common.Math3D;
import common.Point3D;

public class Bomb extends GameObject {
	Point3D movementVector = new Point3D(0.1,0,0);
	double rotAngle=0.05;
	double jumpStrength = 0.3;
	
	public Bomb(){
		this.setMovementControler(new JumperMovementController(this));
		this.getMovementControler().setMovement(Math3D.scalePoint(this.getFace(), 0.2));
		
	}
	
	public void impact(Collision c){
		switch (c.getType()){
			case CARROT:
					break;
			case DEFAULT:
					break;
		}
	}
	
	@Override
	public void clockTicked(ActionEvent arg0) {
	//	this.getMovementControler().play();
		super.clockTicked(arg0);
	}


	public void jump(){
		jump(jumpStrength);
	}
	
	public Planet getPlanet() {
		return planet;
	}

	public void setPlanet(Planet planet) {
		this.planet = planet;
	}
	private void jump(double strength){
		this.getMovementControler().addMovement(
				Math3D.scalePoint(getUp(), strength));
		this.getMovementControler().addMovement(
				Math3D.scalePoint(getFace(), strength*4));
	}
			

}
